/**
 * 
 */
package com.zhz.project.dal.ibatis;

import java.util.List;

import org.springframework.dao.DataAccessException;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.zhz.project.dal.daointerface.BookDAO;
import com.zhz.project.dal.dataobject.Book;

/**
 * @author lidian
 * 
 */
public class BookDAOImpl extends SqlMapClientDaoSupport implements BookDAO {

    public void updateBook(Book book) {
        getSqlMapClientTemplate().update("updateBook", book);
    }

    public List selectAllOpenJgateBooks() {
        List list = null;
        try {
            list = getSqlMapClientTemplate().queryForList("selectAllOpenJgateBooks");
        } catch (DataAccessException e) {
            e.printStackTrace();
        }
        return list;
    }

}
